//
//  LSZInformationTableViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2017/9/30.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LSZInformationTableViewCell.h"

@implementation LSZInformationTableViewCell
-(id)initWithStyleImageViewAndlabel :(NSInteger)type
{
    self = [super init];
    if (self) {
        self.labelTitle = [[UILabel alloc]init];
        self.labelTitle.textColor = titleColorLSZ;
        [self addSubview:self.labelTitle];

        self.imageViewPhoto = [[UIImageView alloc]init];
        self.imageViewPhoto.hidden = YES;
        [self.imageViewPhoto.layer setMasksToBounds:YES];
        [self addSubview:self.imageViewPhoto];

        self.labelName = [[UILabel alloc]init];
        self.labelName.hidden = YES;
        self.labelName.textColor = lightColor;
        self.labelName.textAlignment = NSTextAlignmentRight;
        [self addSubview:self.labelName];
        if (ScreenWidth == 320) {
            //5
            self.labelTitle.font = FONT_(13.5);
            self.labelName.font = FONT_(13.5);
            self.labelName.frame = CGRectMake(ScreenWidth-180-10,(45-16)/2, 150, 16);
            if (type == 1) {
                self.labelTitle.frame = CGRectMake(20,(60-16)/2,100, 16);
                self.imageViewPhoto.frame = CGRectMake(ScreenWidth-20-56,5, 56-6, 56-6);
                [self.imageViewPhoto.layer setCornerRadius:25];

            }else{
                self.labelTitle.frame = CGRectMake(20,(45-16)/2, 100, 16);
            }
        }else if(ScreenWidth == 375){
            // 6 7
            self.labelTitle.font = FONT_(14);
            self.labelName.font = FONT_(14);
            self.labelName.frame = CGRectMake(ScreenWidth-180-10,(50-16)/2, 150, 18);
            if (type == 1) {
                self.labelTitle.frame = CGRectMake(20,(65-18)/2, 100, 18);
                self.imageViewPhoto.frame = CGRectMake(ScreenWidth-20-61, 5, 61-6, 61-6);
                [self.imageViewPhoto.layer setCornerRadius:27.5];
            }else{
                self.labelTitle.frame = CGRectMake(20,(50-18)/2, 100, 18);
            }
        }else {
            //plus
            self.labelTitle.font = FONT_(14.5);
            self.labelName.font = FONT_(14.5);
            [self.imageViewPhoto.layer setCornerRadius:27];
            self.labelName.frame = CGRectMake(ScreenWidth-180-10,(58-20)/2, 150, 20);
            if (type == 1) {
                self.labelTitle.frame = CGRectMake(20,(73-20)/2, 100, 20);
                self.imageViewPhoto.frame = CGRectMake(ScreenWidth-20-72, 5, 69-6, 69-6);
                [self.imageViewPhoto.layer setCornerRadius:31.5];
            }else{
                self.labelTitle.frame = CGRectMake(20,(58-20)/2, 100, 20);
            }
        }
    }
    return self;
}
@end
